package com.briup.me_blog.service;

import com.briup.me_blog.bean.Blog;
import com.briup.me_blog.vo.BlogQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;


public interface BlogService {
    //新增
    Blog saveBlog(Blog blog);
    Blog getAndConvert(Long id);
    //查询
    Blog getBlog(Long id);
    Page<Blog> listBlog(Pageable pageable, BlogQuery blog);
    Page<Blog> listBlog(Pageable pageable);
    Page<Blog> listBlog(Long tagId,Pageable pageable);
    Page<Blog> listBlog(String query,Pageable pageable);
    //修改
    Map<String,List<Blog>> archiveBlog();
    List<Blog> listBlogTop(Integer size);
    Long countBlog();
    Blog updateBlog(Long id, Blog blog);
    //删除
    void  deleteBlog(Long id);
}
